/**
 * 店铺相关API
 */

import {
	http,
	Method
} from '@/utils/request.js';




/**
 * 获取店铺列表
 * @param params
 */
export function getStoreList(params) {
	return http.request({
		url: '/store',
		method: Method.GET,
		params,
	});
}
/**
 * 浏览店铺插入足迹
 * @param {*} params 
 */
export function browseStoreSpoor(storeId) {
	return http.request({
		url: '/footStore/add',
		method: Method.POST,
		params: {
			storeId
		}
	});
}
/**
 * 获取店铺基本信息
 * @param storeId
 */
export function getStoreBaseInfo(storeId) {
	return http.request({
		url: `/store/get/detail/${storeId}`,
		method: Method.GET,
		loading: false,
	});
}

/**
 * 获取店铺分类
 * @param id
 */
export function getStoreCategory(id) {
	return http.request({
		url: `/store/label/get/${id}`,
		method: Method.GET,
	});
}


/**
 * 营业执照
 * @param id
 */
export function getLicencePhoto(id) {
	return http.request({
		url: `/store/get/licencePhoto/${id}`,
		method: Method.GET,
	});
}
// 获取当前登录会员的店铺信息-入驻店铺
export function getBusinessSettleInfo() {
	return http.request({
		url: `/store/apply`,
		method: Method.GET,
	});
}
// 获取营业执照
export function getBusinessLicense(params) {
	return http.request({
		url: `/store/getBusinessLicense`,
		method: Method.GET,
		params
	});
}

/**
 * 推荐的店铺列表，根据当前店铺推荐同类别
 */
export function StoreListrRecommend(params) {
	return http.request({
		url: `/store/getStoreListByPage`,
		method: Method.GET,
		params
	});
}
